package com.css.bjdt_report.executive.util;

import com.css.bjdt_report.cell.entity.Cell;
import com.css.bjdt_report.executive.entity.Exp;

public class CalcExpParser extends ExpParser {
	
	private static CalcExpParser instance;
	
	private CalcExpParser(){}
	
	public static CalcExpParser getInstance(){
		if(instance == null){
			instance = new CalcExpParser();
		}
		return instance;
	}
	
	@Override
	public void parseExp(Cell cell){	
		//先解析列指标,再解析行指标,最后解析单元格指标(后者覆盖前者)
		handleColExp(cell);			
		handleRowExp(cell);
		handleCellExp(cell);
	}

	@Override
	public void handleResult(Cell cell, Exp exp) {
		cell.setCellLevel(exp.getOrder());
	}
}
